﻿<!DOCTYPE html>
<!--隔离盲板动态管理状态记录表-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>

        body {
            padding-bottom: 10px;
        }
    </style>
</head>
<body>
    
<div id="app" v-cloak>   
        <div style="width:100%;text-align:center ">
            <div class="elst-select-mini">
                <label style="font-weight:bold">
                    <el-select @visible-change="visibleChange" v-model="Form.WorkshopType" slot="suffix" :placeholder="IsolationBlindTable.WorkshopType">
                        <el-option label="请选择" value=""></el-option>
                        <el-option v-for="item in WorkshopType" :label="item.value" :value="item.key"></el-option>
                    </el-select>
                    车间隔离盲板动态管理状态记录表
                </label>
            </div>
        </div>
        <el-form :model="Form" status-icon style="margin-top:5px;width:100%">
            <el-row>
                <el-col class="head-tool" span="10">
                    <el-button type="primary" @click="UserInput('tj')">{{col.btnAdd}}</el-button>
                    <el-button type="danger" @click="onDelete">{{col.btnDelete}}</el-button>
                </el-col>
                <el-col span="14">
                    {{IsolationBlindTable.RecordNumber+mark.m}} {{Form.RecordNumber}}
                </el-col>
            </el-row>

            <el-row style="border:1px  solid;">
                <el-col span="24">
                    <el-table :data="Form.IsolationBlindList"  border >
                        <el-table-column type="selection" style=" padding-top: 0px;  padding-bottom: 0px;  "
                                         align="center" width="55" :reserve-selection="true">
                        </el-table-column>
                        <el-table-column prop="Numbering"
                                         :label="IsolationBlindTable.Numbering">
                        </el-table-column>
                        <el-table-column prop="Position"
                                         :label="IsolationBlindTable.Position">
                        </el-table-column>

                        <el-table-column prop="InstallationTime"
                                         :label="IsolationBlindTable.InstallationTime">
                        </el-table-column>
                        <el-table-column prop="InstallationManager"
                                         :label="IsolationBlindTable.InstallationManager">
                        </el-table-column>
                        <el-table-column prop="ExtractionTime"
                                         :label="IsolationBlindTable.ExtractionTime">
                        </el-table-column>
                        <el-table-column prop="ExtractPersonCharge"
                                         :label="IsolationBlindTable.ExtractPersonCharge">
                        </el-table-column>
                        <el-table-column width="53" prop="update" :label="col.btnUpdate" fixed="right">
                            <template slot-scope="scope">
                                <button type="button" class="elst-bt-xg" @click=UserInput('xg',scope.row.id)>
                                    <i class="el-icon-edit"></i>
                                </button>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>
            <el-row>
                <el-form-item style="text-align:center; padding-top:5px">
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
            <el-dialog title="车间隔离盲板动态管理状态记录表" fullscreen="true" :visible.sync="ListItem.dialogVisible" width="90%" height="95%" top="10vh">
                <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
            </el-dialog>
        </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: {
                id: '',
                Form: {
                    id: guidEmpty,
                    WorkshopType: '',
                    RecordNumber: '',
                    ReportTime: '',
                    IsolationBlindList:[]
                },
                WorkshopType: [],
                ListItem: ListItem,
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                handleSelect: function (ev) {
                    console.log(ev);
                },
                handleChecked: function (value) {
                },
                handleCheckedConfirmation: function (value) {
                },
                deleteRow: function (index, rows) {
                    rows.splice(index, 1);
                },
                getData: function () {
                    getDataAdd(this, '/api/IsolationBlindTable/get?id=' + this.id);
                },
                UserInput: function (val, id) { DialogShow(this, val, "IsolationBlindTableListInput.html", id); },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    //this.$refs[formName].validate(function (valid) {
                    //    //验证通过
                    //    if (valid) {
                    onSubmitForm(this, '/api/IsolationBlindTable/Save', mythis.Form);
                    //} else {
                    //    //验证失败
                    //    return false;
                    //}
                    //});
                },
            },
            mounted: function () {
                var list = getDicDataArray(['133']);
                this.WorkshopType = getDicDatafromArray('133', list);//
                this.id = getUrlParam("id");
                this.getData();             
            }
        });
    </script>
</body>
</html>